<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>恒蓝云后台管理系统文档</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="description" content="Description" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, minimum-scale=1.0"
    />
    <link
      rel="stylesheet"
      href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css"
    />
    <link rel="icon" href="./images/logo.ico" type="image/x-icon" />
    <!-- 自定义样式 -->
    <link rel="stylesheet" href="./css/index.css" />
  </head>
  <body>
    <nav>
      <!-- <a href="#/">EN</a> -->
      <a href="#/zh-cn/">中文</a>
    </nav>
    <div id="app"></div>
    <script>
      window.$docsify = {
        name: "恒蓝云后台管理",

        repo: "",
        // loadSidebar: true,
        // 开启导航栏,加载_navbar.md
        loadNavbar: true,
        // 开启封面,加载_coverpage.md
        coverpage: true,

        // 搜索
        // 完整配置参数
        search: {
          maxAge: 86400000, //过期时间,单位毫秒,默认一天
          paths: [], // or 'auto'
          placeholder: "请输入搜索关键字",
          noData: "没有搜到呦!",
          depth: 2,
        },

        // 字符计数
        count: {
          countable: true,
          fontsize: "0.9em",
          color: "rgb(90,90,90)",
          language: "chinese",
        },
      };
    </script>
    <!-- Docsify v4 -->
    <script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
    <!-- 搜索插件 -->
    <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
    <!-- 字符计数统计插件 -->
    <script src="//unpkg.com/docsify-count/dist/countable.js"></script>
  </body>
</html>
<script>
  setTimeout(() => {
    var navEle = document.getElementsByTagName("nav");
    console.log(navEle);
    var themes_a = navEle[0].children[0].children[2];
    // console.log(themes_a);
    var link_themes = document.getElementsByTagName("link");
    console.log(link_themes[0]);
    var url = "./themes/dark.css";
    var link = document.createElement("link");
    link.setAttribute("rel", "stylesheet");
    link.setAttribute("type", "text/css");
    link.setAttribute("href", url);
    link.setAttribute("id", "link_drak");
    // document.getElementsByTagName('head')[0].appendChild(link);
    let isDrak = false;

    themes_a.onclick = () => {
      if (isDrak) {
        var link_drak = document.getElementById("link_drak");
        document.head.removeChild(link_drak);
        isDrak = false;
      } else {
        console.log("暗黑模式");
        document.head.appendChild(link);
        isDrak = true;
      }
    };
  }, 1000);
</script>

<style>
  .docsify_span {
    position: relative;
    width: 1200px;
    display: inline-block;
  }

  .docsify_mark {
    font-weight: 600;
    color: red;
    margin-left: 20px;
    position: absolute;
    top: 0;
    right: 220px;
    padding: 0px 10px;
  }
</style>
